"""
@Time ： 2022/12/2 8:47
@Auth ： 陈杰 200320501042
@E-mail : 1612845322@qq.com
"""
from pymysql import *
conn = connect(host="localhost", port=3306,
               user="root", password="cj2001..",
               db="info", charset='utf8')
cursor = conn.cursor()
sql = "select * from user"
cursor.execute(sql)
rows = cursor.fetchall()
print("-" * 120)
print("录入的图书信息如下：")
for row in rows:
    for i in range(len(row)):
        print(row[i], end="    ")
    print()
cursor.close()  # 关闭游标
conn.close()  # 关闭数据库